package ru.ifmo.croak.impl.ui.query.team1;

import ru.ifmo.croak.api.QueryRequest;

import javax.swing.*;

public class SubscriptionEditor {
    interface Callback {
        void editingComplete(QueryRequest queryRequest, boolean mustRemove, boolean mustCancel);
    }

    SubscriptionEditorForm subscriptionEditorForm;
    public SubscriptionEditor(JFrame rootWindow) {
        subscriptionEditorForm = new SubscriptionEditorForm(rootWindow);
    }

    void startEdit(QueryRequest queryRequest, Callback callback) {
        subscriptionEditorForm.prepareAndDisplay(queryRequest, callback);
    }
}
